Generating a visualization of a metric at a level of execution

ABSTRACT

Described herein are techniques for generating a visualization relating to execution of a workload. Multiple measurements of a plurality of metrics relating to execution of the workload may be aggregated at multiple levels of execution. A visualization may be generated that comprises a representation of the measurements of a metric at one of the levels of execution.

REFERENCE TO RELATED APPLICATIONS

This application is related to International Patent Application No. PCT/US13/______, filed on Dec. 20, 2013 and entitled “Identifying a path in a workload that may be associated with a deviation”, and International Patent Application No. PCT/US13/______, filed on Dec. 20, 2013 and entitled “Discarding data points in a time series”, both of which are hereby incorporated by reference.

BACKGROUND

Enterprises (e.g. business concerns, educational organizations, government agencies) can depend on reports and analyses of data. To generate the reports and analyses, workloads, such as queries, can be executed in an execution environment. For example, a query engine (e.g., HP Vertica) can execute a query over a database. Database query monitoring tools collect measurements of performance metrics (e.g., memory and CPU usage) while a query is executing. These metric measurements are often made available through log files or system tables. The metric measurements can be used to understand and diagnose query performance issues. Other metrics, such as network activity, can be collected as well.

BRIEF DESCRIPTION OF DRAWINGS

The following detailed description refers to the drawings, wherein:

FIG. 1 illustrates a method of generating a visualization of a metric at a level of execution, according to an example.

FIG. 2 illustrates a method of generating a visualization of a selected metric at a selected level of execution, according to an example.

FIG. 3 illustrates a system for generating a visualization of a metric at a level of execution, according to an example.

FIG. 4 illustrates a user interface for displaying a visualization, according to an example.

FIG. 5 illustrates drilling down through multiple levels of execution, according to an example.

FIG. 6 illustrates a visualization showing metric measurements at multiple levels of execution, according to an example.

FIG. 7 illustrates a visualization comparing measurements and estimates of a metric at different levels of execution, according to an example.

FIG. 8 illustrates a computer-readable medium for generating a visualization of a metric at a level of execution, according to an example.

DETAILED DESCRIPTION

Workloads, such as queries, may be executed in an execution environment. For example, a query engine (e.g., HP Vertica) can execute a query over a database. Most database systems include monitoring tools that collect performance metrics for individual queries. These metrics are often low-level metrics that may be incomprehensible to a typical user. Moreover, a long-running query may result in tens or hundreds of thousands of metric measurements. These measurements may be even more numerous and complex if the query engine is a parallel database engine, such as HP Vertica. It is unreasonable to expect a user to comprehend thousands of low-level metrics and be able to understand how they relate to the user's query. Simply providing a high-level overview of the performance of the query is also inadequate as much of the information in the metrics may be lost in the abstraction to the higher level. Additionally, monitoring tools often do not collect all of the metrics that could impact query performance, such as network activity.

According to an example implementing the techniques described herein, a visualization may be generated that represents execution of a workload, such as a query. Multiple measurements of a plurality of metrics relating to execution of the workload over a database may be received. The measurements may be received from database monitoring tools or from other sources. The multiple measurements may be aggregated at multiple levels of execution of the workload. Where the workload is a query, example levels of execution include a query level, a query phase level, a path level, a node level, a path level, and an operator level.

A visualization representing execution of the workload may be generated and displayed to a user via a user interface. The visualization may comprise a representation of the measurements of at least one of the metrics at one of the levels. Furthermore, the user may select different metrics or levels via the user interface, and a new visualization comprising a representation of the measurements of the selected metric(s) at the selected level(s) may be generated and displayed. As a result, metric measurements relating to execution of a query may be displayed in an intuitive and easily understandable fashion for a user. Additionally, the user may drill-up or drill-down through multiple levels of execution to investigate performance of the query. Additional examples, advantages, features, modifications and the like are described below with reference to the drawings.

FIG. 1 illustrates a method for generating a visualization of a metric at a level of execution, according to an example. Method 100 may be performed by a computing device, system, or computer, such as system 310 or computing system 800. Computer-readable instructions for implementing method 100 may be stored on a computer readable storage medium These instructions as stored on the medium are referred to herein as “modules” and may be executed by a computer.

Methods 100 and 200 will be described here relative to system 310 of FIG. 3. System 310 may include and/or be implemented by one or more computers. For example, the computers may be server computers, workstation computers, desktop computers, laptops, mobile devices, or the like, and may be part of a distributed system. The computers may include one or more controllers and one or more machine-readable storage media.

A controller may include a processor and a memory for implementing machine readable instructions. The processor may include at least one central processing unit (CPU), at least one semiconductor-based microprocessor, at least one digital signal processor (DSP) such as a digital image processing unit, other hardware devices or processing elements suitable to retrieve and execute instructions stored in memory, or combinations thereof. The processor can include single or multiple cores on a chip, multiple cores across multiple chips, multiple cores across multiple devices, or combinations thereof. The processor may fetch, decode, and execute instructions from memory to perform various functions. As an alternative or in addition to retrieving and executing instructions, the processor may include at least one integrated circuit (IC), other control logic, other electronic circuits, or combinations thereof that include a number of electronic components for performing various tasks or functions.

The controller may include memory, such as a machine-readable storage medium. The machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that contains or stores executable instructions. Thus, the machine-readable storage medium may comprise, for example, various Random Access Memory (RAM), Read Only Memory (ROM), flash memory, and combinations thereof. For example, the machine-readable medium may include a Non-Volatile Random Access Memory (NVRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a storage drive, a NAND flash memory, and the like. Further, the machine-readable storage medium can be computer-readable and non-transitory. Additionally, system 310 may include one or more machine-readable storage media separate from the one or more controllers.

System 310 may include a number of components. For example, system 310 may include a database 312 for storing measurements 313, an aggregator 314, a web server 316, and a visualization generator 318. System 310 may be connected to execution environment 320 and user interface 330 via a network. The network may be any type of communications network, including, but not limited to, wire-based networks (e.g., cable), wireless networks (e.g., cellular, satellite), cellular telecommunications network(s), and IP-based telecommunications network(s) (e.g., Voice over Internet Protocol networks). The network may also include traditional landline or a public switched telephone network (PSTN), or combinations of the foregoing. The components of system 310 may also be connected to each other via a network.

Method 100 may begin at 110, where multiple measurements 312 of a plurality of metrics may be received. The multiple measurements may relate to execution of a workload in an execution environment 320. The multiple measurements may be stored in database 312.

Execution environment 320 can include an execution engine and a storage repository of data. An execution engine can include one or multiple execution stages for applying respective operators on data, where the operators can transform or perform some other action with respect to data. A storage repository refers to one or multiple collections of data. An execution environment can be available in a public cloud or public network, in which case the execution environment can be referred to as a public cloud execution environment. Alternatively, an execution environment that is available in a private network can be referred to as a private execution environment.

As an example, execution environment 320 may be a database management system (DBMS). A DBMS stores data in relational tables in a database and applies database operators (e.g. join operators, update operators, merge operators, and so forth) on data in the relational tables. An example DBMS environment is the HP Vertica product.

A workload may include one or more operations to be performed in the execution environment. For example, the workload may be a query, such as a Structured Language (SQL) query. The workload may be some other type of workflow, such as a Map-Reduce workflow to be executed in a Map-Reduce execution environment or an Extract-Transform-Load (ETL) workflow to be executed in an ETL execution environment.

The multiple measurements 313 of the plurality of metrics relate to execution of the workload. For example, the metrics may include performance metrics like elapsed time, execution time, memory allocated, memory reserved, rows processed, and processor utilization. The metrics may also include other information that could affect workload performance, such as network activity or performance within execution environment 320. For instance, poor network performance could adversely performance of a query whose execution is spread out over multiple nodes in execution environment 320. Additionally, estimates of the metrics for the workload may also be available. The estimates may indicate an expected performance of the workload in execution environment 320. Having the estimates may be useful for evaluating the actual performance of the workload.

The metrics (and estimates) may be retrieved from the execution environment 320 and received at system 310. The metrics may be measured and recorded at set time intervals by monitoring tools in the execution environment. The measurements may then be retrieved periodically, such as after an elapsed time period (e.g., every 4 seconds). Alternatively, the measurements could be retrieved all at once after the query has been fully executed. The metrics may be retrieved from log files or system tables in the execution environment.

At 120, the multiple measurements may be aggregated by aggregator 314 at multiple levels of execution. A level of execution as used herein is intended to denote an execution perspective through which to view the metric measurements. Where the workload is a query, example levels of execution include a query level, a query phase level, a path level, a node level, a path level, and an operator level. These will be illustrated through an example where HP Vertica is the execution environment 320.

Monitoring tools in the HP Vertica engine collect metrics for each instance of each physical operator in the physical execution tree of a submitted query. The measurements of these metrics at the physical operator level correspond to the “operator level”. Second, from a user perspective, the query execution plan is the tree of logical operators (referred to as paths in HP Vertica) shown by the SQL explain plan command. Each logical operator (e.g., GroupBy) comprises a number of physical operators in the physical execution tree (e.g., ExpressionEval, HashGroupBy). Accordingly, the metric measurements may be aggregated at the logical operator level, which corresponds to the “path level”. Third, a physical operator may run as multiple threads on a node (e.g., a parallel tablescan). Additionally, because HP Vertica is a parallel database, a physical operator may execute on multiple nodes. Thus, the metric measurements may be aggregated at the node level, which corresponds to the “node level”.

Fourth, a phase is a sub-tree of a query plan where all operators in the sub-tree may run concurrently. In general, a phase ends at a blocking operator, which is an operator that does not produce any output until it has read all of its input (or, all of one input if the operator has multiple inputs, like a join). Examples of blocking operators are Sort and Count. Accordingly, the metric measurements may be aggregated at the phase level, which corresponds to the “query phase level”. Fifth, the metric measurements may be reported for the query as a whole. Thus, the metric measurements may be aggregated at a top level, which corresponds to the “query level”.

Consequently, metric measurements as interpreted by aggregator 314 form a multi-dimensional, hierarchical dataset where the dimensions are the various levels of execution. The metrics may then be aggregated (rolled-up) at the operator level, the path level, the node level, the query phase level, and the query level.

At 130, a visualization representing execution of the workload may be generated. The visualization may comprise a representation of the measurements of at least one of the metrics at one of the levels. The representation may be in various forms, such as in the form of graphs, charts, and/or text. The visualization may additionally comprise a representation of estimates of the measurements of the at least one metric at the one level. The visualization may be generated by visualization generator 318, which interfaces with aggregator 314 to obtain the metric measurements aggregated at the appropriate level.

Returning to the example where the workload is a query, the visualization can vary according to level of execution as follows. A visualization generated at the query level may include a representation of execution of the entire query. A visualization generated at the query phase level may include a representation of execution of the query at a current phase of the query. A visualization generated at the node level may include a representation of execution of the query on one or more nodes of a query engine executing the query. A visualization generated at the path level may include a representation of execution of logical operations of the query. A visualization generated at the operator level may include a representation of execution of physical operations of the query. To reduce the level of detail in the metric measurements, the initial visualization may show the measurements for a default metric (e.g., execution time) aggregated at the node level or path level.

Method 200 of FIG. 2 begins at 210, where a user interface is provided. The user interface 330 may be provided by web server 316 of system 310, and may be accessed by a user using a web browser or other application. The user interface 330 may be used to submit the workload to the execution environment 320. Alternatively, a workload executing in execution environment 320 may be accessed by entering identifying information, such as transaction and statement identifiers. The user interface 330 may allow selection of one or more of the metrics for display in the visualization. For example, the metrics may be selected in any of various ways, such as by clicking on a tab in the user interface 330, each tab representing a different metric. Alternatively, other selection options may be a dropdown menu, radio buttons, textual input, voice input, touch input, and the like. In addition, the user interface 330 may allow selection of one or more levels. The one or more levels may be selected in any of various ways as well, such as via a dropdown menu or by drilling down on a current displayed level via clicking on the displayed level. For instance, clicking on a path may drill down to the operator level for that path, as illustrated in FIG. 5.

At 220, a selection of one or more of the metrics and one of the levels may be received. At 230, a new visualization may be generated. The new visualization may include a representation of the measurements of the selected one or more metrics at the selected level. The user interface 330 may also allow selection of a time period. For example, the user can view the entire execution history of a completed query, a snapshot of an executing query, or metric information over a range. The visualization may thus be configured to only include measurements of the selected metric(s) at the selected level over the selected time period. This allows a user to focus on execution of the workload during a particular period of time, which can be useful for example if unexpected performance is exhibited only during a particular time. Additionally, system 310 may provide user interface 330 with the explain plan (generated by the execution engine) and any events that occurred during execution (e.g., has table overflow to disk). In some examples, some or all of this information can be incorporated into the visualization for display to the user.

FIG. 4 illustrates a user interface 400 for displaying a visualization for a query executed in an execution environment, according to an example. Portion 410 is a text input box that allows a user to input an SQL query for submission to an execution environment (e.g., HP Vertica). Portion 420 include two text input boxes for identifying a query already executing in the execution environment. The query can be identified using a transaction identifier or a statement identifier. The user interface 400 could be configured to accommodate other methods of identification as well, depending on the execution environment. Buttons 430 allow for specification of a time frame for monitoring the query. The “Profile” button will cause the system to wait for complete execution of the query and then retrieve and display a complete view of the query execution. The “Monitor” button will cause the system to monitor execution of the query and periodically update the visualization to include current metric measurements.

Portion 440 provides identification information for a query whose metrics are being currently displayed in portion 460. Portion 450 comprises various tabs, each tab corresponding to a metric. The metrics are elapsed time, execution time, memory allocated, memory reserved, rows processed, and history. The history metric represents a view of execution of the entire query up to the current time over one or more metrics. Portion 460 constitutes the representation of the selected metric (elapsed time) at the selected level of execution (node level). The representation in this example visualization is a bar graph, the bar graph representing elapsed time for each node. There are many other possible representations for illustrating the metric measurements and estimates. For example, line charts, pie charts, a tree of operators, etc., could be used. Additionally, metric measurements could be illustrated by varying the size, color, position, or shading of a displayed item. Combinations of these representations could be used as well.

FIG. 5 illustrates drilling down through multiple levels of execution, according to an example. This is intended merely to illustrate the drill down process. Thus, the visualization for step 2 represents a modification of the visualization for step 1, and the visualization for step 3 represents a modification of the visualization for step 2. The metric shown in each step is memory reserved. At step 1, measurements of the memory reserved metric are depicted via a bar graph for node 0001 (i.e., at the node level). At step 2, the user drills down on node 0001 to show how the memory has been used at different parts of the query. In particular, the user has drilled down to the path level. As is evident in the visualization, most of the memory has been reserved for path 3. The user has thus learned some potentially useful information. At step 3, the user drills down on path 3 to show how the memory reserved for the path is distributed among the physical operators associated with the path (i.e., the operator level). Again, here the user learns that a single physical operator—GroupByHash—dominates the memory reservation, while the other physical operators are using only a small portion of the memory reserved for the query.

The drill-down operation can be achieved in various ways. For example, the user interface 330 can be configured so that the user may click on a bar in the bar graph for which he desires to drill down. For example, the user could click on the bar for node 0001 in step 1, and in response the visualization could be updated to display the path information (step 2). Clicking on the node 0001 identifier could also cause the drill-down operation to occur. Other methods of indicating a drill-down operation could be used as well, such as via a button, via other interactive elements, via speech, via touch, or the like.

In addition, while exploring the data, the user can pivot to view along different dimensions. For example, the user may start by looking at the performance per node (aggregating with node at the top level), drill down to see a path on that node, and then pivot to view that path on all nodes (aggregating with path at the top level).

FIG. 6 illustrates a visualization showing metric measurements at multiple levels of execution, according to an example. Visualization 600 shows a partial representation of the elapsed time metric in a multi-node system. In particular, node 0002 has been drilled down to the operator level. Although not shown in the figure, the bar graph is plotted as a timeline, where the time scale is displayed at the bottom of the visualization. The user may now see the times at which each path and operator started and stopped. In addition to allowing the user to drilldown and roll up metric information, the visualization can be generated so as to suppress unhelpful information. For example, non-executing portions of a query may be hidden (such as in a snapshot visualization), insignificant metric values can be hidden, and logarithmic scales can be used for certain charts.

FIG. 7 illustrates a visualization 700 comparing multiple metrics at different levels of execution, according to an example. In particular, estimated rows processed 710 are compared with actual rows processed 720. By comparing the estimated metric to the actual measurements, a user can determine whether some aspect of the query performed in an unexpected manner. Again, the benefit of drilling down through the different levels is evidenced here. At the node level, the estimate and the actual measurement were similar, and thus one might assume that the query was executed according to expectations. However, drilling down to the path level and then to the operator level reveals that estimates were off for path-1 and path 1, and the corresponding physical operators.

FIG. 8 illustrates a computer-readable medium for generating a visualization of a metric at a level of execution, according to an example. Computer 810 may include and/or be implemented by one or more computers. For example, the computers may be server computers, workstation computers, desktop computers, laptops, mobile devices, or the like, and may be part of a distributed system. The computers may include one or more controllers and one or more machine-readable storage media, as described with respect to system 310, for example.

In addition, users of computer 810 may interact with computer 810 through one or more other computers, which may or may not be considered part of computer 810. As an example, a user may interact with computer 810 via a computer application residing on system 800 or on another computer, such as a desktop computer, workstation computer, tablet computer, or the like. The computer application can include a user interface (e.g., touch interface, mouse, keyboard, gesture input device).

Computer 810 may perform methods 100 and 200, and variations thereof. Additionally, the functionality implemented by computer 810 may be part of a larger software platform, system, application, or the like. For example, computer 810 may be part of a data analysis system.

Computer(s) 510 may have access to a database. The database may include one or more computers, and may include one or more controllers and machine-readable storage mediums, as described herein. Computer 510 may be connected to the database via a network. The network may be any type of communications network, including, but not limited to, wire-based networks (e.g., cable), wireless networks (e.g., cellular, satellite), cellular telecommunications network(s), and IP-based telecommunications network(s) (e.g., Voice over Internet Protocol networks). The network may also include traditional landline or a public switched telephone network (PSTN), or combinations of the foregoing.

Processor 820 may be at least one central processing unit (CPU), at least one semiconductor-based microprocessor, other hardware devices or processing elements suitable to retrieve and execute instructions stored in machine-readable storage medium 830, or combinations thereof. Processor 820 can include single or multiple cores on a chip, multiple cores across multiple chips, multiple cores across multiple devices, or combinations thereof. Processor 820 may fetch, decode, and execute instructions 832-836 among others, to implement various processing. As an alternative or in addition to retrieving and executing instructions, processor 820 may include at least one integrated circuit (IC), other control logic, other electronic circuits, or combinations thereof that include a number of electronic components for performing the functionality of instructions 832-836. Accordingly, processor 820 may be implemented across multiple processing units and instructions 832-836 may be implemented by different processing units in different areas of computer 810.

Machine-readable storage medium 830 may be any electronic, magnetic, optical, or other physical storage device that contains or stores executable instructions. Thus, the machine-readable storage medium may comprise, for example, various Random Access Memory (RAM), Read Only Memory (ROM), flash memory, and combinations thereof. For example, the machine-readable medium may include a Non-Volatile Random Access Memory (NVRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a storage drive, a NAND flash memory, and the like. Further, the machine-readable storage medium 830 can be computer-readable and non-transitory. Machine-readable storage medium 830 may be encoded with a series of executable instructions for managing processing elements.

The instructions 832-836 when executed by processor 820 (e.g., via one processing element or multiple processing elements of the processor) can cause processor 820 to perform processes, for example, methods 100 and 200, and/or variations and portions thereof.

For example, receiving instructions 832 may cause processor 820 to receive multiple measurements of a plurality of metrics relating to execution of a workload over a database. The workload may be a query or a workflow. Aggregating instructions 834 may cause processor 820 to aggregate the multiple measurements of the plurality of metrics at multiple levels of execution of the workload. For a query, the multiple levels of execution can include a query level, a query phase level, a node level, a path level, and an operator level. For a workflow, the multiple levels of execution can include a workflow level, a node level, a logical operator level, and a physical operator level. Generating instructions 836 may cause processor 820 to generate a visualization representing execution of the workload, the visualization comprising a representation of the measurements of at least one of the metrics at one of the levels.

In the foregoing description, numerous details are set forth to provide an understanding of the subject matter disclosed herein. However, implementations may be practiced without some or all of these details. Other implementations may include modifications and variations from the details discussed above. It is intended that the appended claims cover such modifications and variations. 

What is claimed is:
 1. A method comprising, by a processing system: receiving multiple measurements of a plurality of metrics relating to execution of a workload in an execution environment; aggregating the multiple measurements of the plurality of metrics at multiple levels of execution of the workload; generating a visualization representing execution of the workload, the visualization comprising a representation of the measurements of at least one of the metrics at one of the levels.
 2. The method of claim 1, further comprising: providing a user interface to allow selection of one or more of the metrics and one of the levels; receiving a selection of one or more of the metrics and one of the levels; and generating a new visualization representing execution of the workload, the new visualization comprising a representation of the measurements of the selected one or more metrics at the selected level.
 3. The method of claim 2, wherein the user interface allows selection of a time period, the generated new visualization comprising a representation of the measurements of the selected one or more metrics at the selected level over the selected time period.
 4. The method of claim herein the workload comprises a query.
 5. The method of claim 4, wherein the multiple levels comprise at least two of a query level, a query phase level, a node level, a path level, and an operator level.
 6. The method of claim 5, wherein: a visualization generated at the query level comprises a representation of execution of the entire query, a visualization generated at the query phase level comprises a representation of execution of the query at a current phase of the query, a visualization generated at the node level comprises a representation of execution of the query on one or more nodes of a query engine executing the query, a visualization generated at the path level comprises a representation of execution of logical operations of the query, and a visualization generated at the operator level comprises a representation of execution of physical operations of the query.
 7. The method of claim 6, further comprising modifying the visualization to show measurements of the at least one of the metrics at a different level than the one of the levels in response to a user input.
 8. The method of claim 1, wherein the plurality of metrics comprise at least two of elapsed time, execution time, memory allocated, memory reserved, rows processed, processor utilization, and network activity.
 9. The method of claim 1, wherein the visualization further comprises a representation of estimates of the at least one of the metrics at the one of the levels.
 10. A system comprising: a database to store measurements of metrics collected by a query execution engine during execution of a query; an aggregator to aggregate the measurements of he metrics at multiple levels of execution of the query; a web server to provide a user interface to allow selection of one or more of the metrics and one of the levels; and a visualization generator to generate a visualization representing execution of the query, the visualization comprising a representation of the measurements of a selected metric at a selected level of execution.
 11. The system of claim 10, wherein the multiple levels comprise at least two of a query level, a query phase level, a node level, a path level, and an operator level.
 12. A non-transitory computer-readable storage medium storing instructions for execution by a computer, the instructions when executed causing the computer to: receive multiple measurements of a plurality of metrics relating to execution of a workload over a database; aggregate the multiple measurements of the plurality of metrics at multiple levels of execution of the workload: generate a visualization representing execution of the workload, the visualization comprising a representation of the measurements of at least one of the metrics at one of the levels.
 13. The medium of claim 12, wherein the workload comprises a query or a workflow.
 14. The medium of claim 13, wherein if the workload comprises a query, the multiple levels comprise at least two of a query level, a query phase level, a node level, a path level, and an operator level.
 15. The medium of claim 13, wherein if the workload comprises a workflow, the multiple levels comprise at least two of a workflow level, a node level, a logical operator level, and a physical operator level. 